﻿using System;
using System.Web.UI;
using NazSoft.Framework;

public partial class Admin_News : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Initialize = "UserId=1,PageUrl=" + ConvertRelativeUrlToAbsoluteUrl("~/Handlers/FileUpload.ashx");// + "TodayDate=" + DateTime.Now.ToString();

    }

    public string Initialize { get; set; }
    public string ConvertRelativeUrlToAbsoluteUrl(string relativeUrl)
    {

        if (Request.IsSecureConnection)

            return string.Format("https://{0}{1}", Request.Url.Host, Page.ResolveUrl(relativeUrl));

        else

            return string.Format("http://{0}:{2}{1}", Request.Url.Host, Page.ResolveUrl(relativeUrl), Request.Url.Port);

    }
}